package com.flame.shapeville.component.task1.shape2D;

import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Shape;

/**
 * Represents a circle shape used in Task 1.
 * <p>
 * This class creates a circular shape centered within the given size boundary.
 *
 * @author Flame Dev Team
 * @version 1.0
 * @since 2025-05-12
 */
public class JfCircle extends JfShape2D {
    /**
     * The internal Circle object used for rendering.
     */
    private Circle circle;

    /**
     * A dimension parameter used to determine the overall layout size.
     */
    private double shape;

    /**
     * Constructs a new circle with the specified size.
     *
     * @param shape the width and height of the drawing area
     */
    public JfCircle(double shape) {
        this.shape = shape;
        double radius = shape / 2 * 0.9;
        circle = new Circle(shape / 2, shape / 2, radius);
        circle.setFill(Color.CYAN);
        circle.setStroke(Color.BLACK);
        circle.setStrokeWidth(2);
    }

    /**
     * Gets the visual representation of this shape.
     *
     * @return the JavaFX Shape object representing the circle
     */
    @Override
    public Shape getShape() {
        return circle;
    }
}
